package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotPickRecordMapper;
import com.ruoyi.wisdom.domain.IotPickRecord;
import com.ruoyi.wisdom.service.IIotPickRecordService;

/**
 * 进出记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-02
 */
@Service
public class IotPickRecordServiceImpl implements IIotPickRecordService 
{
    @Autowired
    private IotPickRecordMapper iotPickRecordMapper;

    /**
     * 查询进出记录
     * 
     * @param id 进出记录主键
     * @return 进出记录
     */
    @Override
    public IotPickRecord selectIotPickRecordById(Long id)
{
    return iotPickRecordMapper.selectIotPickRecordById(id);
}


    @Override
    public IotPickRecord selectIotPickRecord(IotPickRecord iotPickRecord)
    {
        return iotPickRecordMapper.selectIotPickRecord(iotPickRecord);
    }

    @Override
    public IotPickRecord selectIotPickRecordByHash(String hash)
    {
        return iotPickRecordMapper.selectIotPickRecordByHash(hash);
    }

    /**
     * 查询进出记录列表
     * 
     * @param iotPickRecord 进出记录
     * @return 进出记录
     */
    @Override
    public List<IotPickRecord> selectIotPickRecordList(IotPickRecord iotPickRecord)
    {
        return iotPickRecordMapper.selectIotPickRecordList(iotPickRecord);
    }

    /**
     * 新增进出记录
     * 
     * @param iotPickRecord 进出记录
     * @return 结果
     */
    @Override
    public int insertIotPickRecord(IotPickRecord iotPickRecord)
    {
        iotPickRecord.setCreateTime(DateUtils.getNowDate());
        return iotPickRecordMapper.insertIotPickRecord(iotPickRecord);
    }

    /**
     * 修改进出记录
     * 
     * @param iotPickRecord 进出记录
     * @return 结果
     */
    @Override
    public int updateIotPickRecord(IotPickRecord iotPickRecord)
    {
        iotPickRecord.setUpdateTime(DateUtils.getNowDate());
        return iotPickRecordMapper.updateIotPickRecord(iotPickRecord);
    }

    /**
     * 批量删除进出记录
     * 
     * @param ids 需要删除的进出记录主键
     * @return 结果
     */
    @Override
    public int deleteIotPickRecordByIds(Long[] ids)
    {
        return iotPickRecordMapper.deleteIotPickRecordByIds(ids);
    }

    /**
     * 删除进出记录信息
     * 
     * @param id 进出记录主键
     * @return 结果
     */
    @Override
    public int deleteIotPickRecordById(Long id)
    {
        return iotPickRecordMapper.deleteIotPickRecordById(id);
    }

    @Override
    public int deleteIotPickRecordByParams(IotPickRecord iotPickRecord)
    {
        return iotPickRecordMapper.deleteIotPickRecordByParams(iotPickRecord);
    }
}
